import { ResponseDto } from '@/dto/response.dto';
import { CwindMenus } from '@/models/cwind_menus.model'; // cwind_menu 实体
import { PickType } from '@nestjs/mapped-types';
/*
 * @Description: 查询列表返回响应体 Dto
 * @Version: 2.0
 * @Author: cwind
 * @Date: 2022-10-27 16:05:18
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2025-05-15 10:47:23
 */
// title: item.title,
//       icon: item.icon,
//       affix_tab: item.affix_tab,
//       order: item.order,
//       badge: item.badge,
//       badge_type: item.badge_type,
//       badge_variants: item.badge_variants,
export class MenuMetaDto {
  affix_tab: number;
  badge: string;
  badge_type: string;
  badge_variants: string;
  icon: string;
  order: number;
  title: string;
}
export class MenuManagementListDto extends PickType(CwindMenus, [
  'menu_id',
  'name',
  'status',
  'type',
  'path',
  'component',
  'pid',
  'permission',
]) {
  children?: MenuManagementListDto[];
  meta?: MenuMetaDto;
}
/**
 * @description: 菜单列表 Dto
 * @author: cwind
 */
export class ResponseMenuManagementDto extends ResponseDto {
  data: MenuManagementListDto[];
}

/**
 * @description: 创建菜单数据 Dto
 * @author: cwind
 */
export class CreateMenuManagementDto extends ResponseDto {
  data: CwindMenus;
}
